A MOP Based DSL for Testing Java Programs using OCL
نویسنده
چکیده
OCL is used to specify systems by de ning pre and postconditions for class operations. Typically, the conditions refer to properties and operations that are de ned in a model. When the model is implemented, various implementation decisions are made regarding properties and operations that cause the OCL conditions to be inconsistent with the implementation. This paper shows how OCL conditions can be performed against a Java implementation of a model and how a meta-object protocol can be used to control the relationship between the original model and the implementation thereby retaining OCL consistency.
منابع مشابه
Unit Testing for Domain-Specific Languages
Domain-specific languages (DSLs) offer several advantages by providing idioms that are similar to the abstractions found in a specific problem domain. However, a challenge is that tool support for DSLs is lacking when compared to the capabilities offered in general-purpose languages (GPLs), such as Java and C++. For example, support for unit testing a DSL program is absent and debuggers for DSL...
متن کاملUsing Aspect-oriented Programming to Instrument Ocl Contracts in Java
Analysis and design by contract allows the definitions of a formal agreement between a class and its clients, expressing each party’s rights and obligations. Contracts written in the Object-Constraint Language (OCL) are known to be a useful technique to specify the precondition and postcondition of operations and class invariants in a UML context, making the definition of object-oriented analys...
متن کاملStatic Source Code Analysis using OCL
The majority of artifacts created during software development are representations of programs in textual syntax. Although graphical descriptions are becoming more widespread, source code is still indispensable. To obtain programs that behave correctly and adhere to given coding conventions, source code must be analyzed — preferably using automated tools. Building source code analyzers has a lon...
متن کاملA Hoare Calculus for Verifying Java Realizations of OCL-Constrained Design Models
The Object Constraint Language OCL offers a formal notation for constraining the modelling elements occurring in UML diagrams. In this paper we apply OCL for developing Java realizations of UML design models and introduce a new Hoare-Calculus for Java classes which uses OCL as assertion language. The Hoare rules are as usual for while programs, blocks and (possibly recursive) method calls. Upda...
متن کاملTesting Distributed Component Based Systems Using UML/OCL
We present a pragmatic approach using formal methods to increase the quality of distributed component based systems: Based on UML class diagrams annotated with OCL constraints, code for runtime checking of components in J2EE/EJB is automatically generated. Thus, a UML–model for a component can be used in a black–box test for the component. Further we introduce different design patterns for EJBs...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- ECEASST
دوره 24 شماره
صفحات -
تاریخ انتشار 2009